<template>
  <div>
    <Header></Header>

    <div class="main content">
      <div class="m_title">
        企业详情
      </div>
      <div class="com-info">
        <p>
          <img v-if="company.logo" :src="company.logo" style="border-radius: 5px" width="200px" height="100px">
        </p>
        <p class="title">公司名称：{{company.name}}</p>
        <p>类型：{{company.type}}</p>
        <p>联系人：{{company.contact}}</p>
        <p>联系电话：{{company.telephone}}</p>
        <p>邮箱：{{company.email}}</p>
        <p>地址：{{company.addr}}</p>
        <p>网站：{{company.url}}</p>
        <p>规模：{{company.size}}</p>
        <p>描述：{{company.description}}</p>
      </div>
    </div>

    <Footer></Footer>
  </div>
</template>

<script>
  import '../assets/css/styles.css'
  import Header from "./Header";
  import Footer from "./Footer";
  import {company_info} from "../api/front";

  export default {
    name: "Index",
    components:{Footer, Header},
    data(){
      return {
        company:{},
      }
    },
    mounted() {
      company_info(this.$route.params.id).then(res=>{
        this.company = res.data;
      })
    }
  }
</script>

<style scoped>

  .main{
    width: 1000px;
    margin: auto;
  }

  .content{
    margin-top: 20px;
  }

  .m_module{
    margin-bottom: 20px;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 8px 0 rgba(7,17,27,.2);
  }
  .m_title{
    border-bottom: 1px solid #f0f0f0;
    color: #666666;
    font-size: 18px;
    padding: 10px;
  }
  .m_title a{
    float: right;
    color: #999999;
    font-size: 14px;
    text-decoration: none;
  }

  .com-info{
    font-size: 15px;
  }
  .com-info .title{
    font-size: 24px;
    font-weight: bold;
    text-align: left;
  }
  .com-info p{
    padding: 5px;
    color: #777777;
  }
</style>